package leetcode.easy.q171;

/**
 * { @link https://leetcode.cn/problems/excel-sheet-column-number/}
 */
public class Solution {
    public int titleToNumber(String columnTitle) {
        int res = 0;
        for (char c : columnTitle.toCharArray()) {
            res = res * 26 + (c - 64);
        }
        return res;

    }

    public static void main(String[] args) {
        System.out.println(new Solution().titleToNumber("AZ"));
    }
}
